namespace OasisCiq.Xal
{
    using System;
    using System.Linq;
    
    /// <summary>
    /// A list of locality name element types such as name of locality, reference data in support of locality
    /// </summary>
    public class LocalityNameTypeList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "Name", // Name of the locality
            "Number",
            "ReferenceLocation", // Any reference locality data in support of the locality. e.g. Next town north of Town A, via-town name
            "Type" // Other supporting information
        };

        public LocalityNameTypeList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}